Skip to content

Add lint rule to prevent use of stdlib log package#4957

Merged
pietern merged 2 commits intomainfrom
go1.21-log-slog
Apr 15, 2026
Merged

Add lint rule to prevent use of stdlib log package#4957
pietern merged 2 commits intomainfrom
go1.21-log-slog

Conversation

@pietern
Copy link
Copy Markdown
Contributor

@pietern pietern commented Apr 13, 2026

Summary

  • Add a depguard rule that blocks import "log" and points to libs/log
  • Migrate the single existing violation in libs/appproxy
  • Exclude build tools (docsgen, schema, validation) that use log.Fatal

This pull request was AI-assisted by Isaac.

pietern added 2 commits April 13, 2026 23:50
Add a depguard rule that blocks `import "log"` and nudges towards
`libs/log` instead. Migrate the single existing violation in
`libs/appproxy`. Build tools (`docsgen`, `schema`, `validation`)
are excluded.

Co-authored-by: Isaac
@pietern pietern requested a review from andrewnester April 14, 2026 09:49
@pietern pietern added this pull request to the merge queue Apr 15, 2026
Merged via the queue into main with commit 95b7cb9 Apr 15, 2026
24 checks passed
@pietern pietern deleted the go1.21-log-slog branch April 15, 2026 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants